package com.tanhua.admin.task;

import com.tanhua.admin.service.AnalysisService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class AnalysisTask {

    @Autowired
    private AnalysisService analysisService;

    @Scheduled(cron = "0/10  * * * * ? ")
    public void analysis() {
        log.debug("*******定时任务开始了*******");
        analysisService.analysis();
        log.debug("*******定时任务结束了*******");
    }
}
